(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2240],{70049:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/contenido/[...identifier]",function(){return r(22881)}])},37450:function(e,t,r){"use strict";r.d(t,{Z:function(){return m}});var n=r(11720),o=r(15621),i=r(32360),a=r(42352),l=o.renderToString(n.default.createElement(i.Z)),c=o.renderToString(n.default.createElement(a.Z)),u={selector:".custom-carousel",isMobile:!1,slideSelector:".slide",arrowLeftCustomComponent:l,arrowRightCustomComponent:c,arrowLeftCustomAbsoluteStyle:{top:"50%"},arrowRightCustomAbsoluteStyle:{top:"50%"}},s=function(e){f(e),d(e)},f=function(e){var t;return null===(t=null===e||void 0===e?void 0:e.querySelector(".carousel-arrow-right"))||void 0===t?void 0:t.remove()},d=function(e){var t;return null===(t=null===e||void 0===e?void 0:e.querySelector(".carousel-arrow-left"))||void 0===t?void 0:t.remove()},v=r(18561),m=function(e,t){var r=(0,n.useState)(!0),o=r[0],i=r[1],a=(0,n.useState)(!0),f=a[0],d=a[1],m=(0,n.useRef)(0),p=t||u,g=p.selector,_=p.isMobile,h=p.slideSelector,y=p.arrowLeftCustomComponent,b=void 0===y?l:y,S=p.arrowRightCustomComponent,x=void 0===S?c:S,k=p.revalidate,w=(0,n.useCallback)((function(e){var t=e.target;0!==t.scrollLeft?Math.trunc(t.offsetWidth+t.scrollLeft+1)>=Math.trunc(t.scrollWidth)?d(!0):(i(!1),d(!1)):i(!0)}),[]),C=(0,n.useCallback)((function(){var e=document.querySelector(".carousel-arrow-right svg");e&&0===m.current&&(e.style.display="inline-block",m.current++)}),[]),L=(0,n.useCallback)((function(){var e=document.querySelector(g);e&&d(e.offsetWidth===e.scrollWidth)}),[g]);(0,n.useEffect)((function(){i(!0),d(!1)}),[k]),(0,n.useEffect)((function(){return L(),window.addEventListener("resize",L),function(){return window.removeEventListener("resize",L)}}),[L,e,g]),(0,n.useEffect)((function(){var e=document.querySelector(g),r=document.querySelector(h),n=document.querySelectorAll(h);if(e&&r)return e.addEventListener("scroll",w),n.forEach((function(e){return e.addEventListener("click",C)})),(0,v.f)(".slick-slider",(function(){var e=document.querySelector(".slick-next"),t=document.querySelector(".slick-prev");e&&t&&(t.innerHTML=b,e.innerHTML=x)})),(0,v.f)(g,(function(){if(e&&r&&_){s(e),e.classList.add("relative");var n=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u,r=t.arrowLeftCustomAbsoluteStyle,n=t.arrowLeftCustomComponent,o=void 0===n?l:n,i=document.createElement("div");return i.innerHTML=o,i.classList.add("carousel-arrow-left","sticky","w-min-content","z-10"),i.classList.toggle("hidden",e),i.style.top=r.top||"",i.style.bottom=r.bottom||"",i.style.left=r.left||"",i.style.right=r.right||"",i}(o,t),i=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u,r=t.arrowRightCustomAbsoluteStyle,n=t.arrowRightCustomComponent,o=void 0===n?c:n,i=document.createElement("div");return i.innerHTML=o,i.classList.add("carousel-arrow-right","sticky","w-min-content","z-10"),i.classList.toggle("hidden",e),i.style.top=r.top||"",i.style.bottom=r.bottom||"",i.style.left=r.left||"",i.style.right=r.right||"",i}(f,t);i.onclick=function(){return t=r,void(e.scrollLeft+=t.clientWidth);var t},n.onclick=function(){return t=r,void(e.scrollLeft-=t.clientWidth);var t},e.append(n,i)}else s(e)})),function(){e.removeEventListener("scroll",w),n.forEach((function(e){return e.removeEventListener("click",C)}))}}),[e,null===t||void 0===t?void 0:t.isMobile,o,f,g,k])}},15025:function(e,t,r){"use strict";r.d(t,{S:function(){return a}});var n=r(55464),o=r(11720),i=r(79736);var a=function(e,t,r){var a,l=(0,n.a)("\n query getCMSPage($identifier: String!) {\n cmsPage(identifier: $identifier) {\n title\n identifier\n content\n url_key\n meta_title\n meta_description\n }\n }\n",{identifier:e},t,r),c=l.data,u=l.error,s=l.isValidating;return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{threshold:.3},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:".smooth";(0,i.A)()&&(e.threshold=.2),o.default.useEffect((function(){var r=new IntersectionObserver((function(e){var t=!0,n=!1,o=void 0;try{for(var i,a=e[Symbol.iterator]();!(t=(i=a.next()).done);t=!0){var l=i.value;l.target.classList.toggle("show",l.isIntersecting),l.isIntersecting&&r.unobserve(l.target)}}catch(c){n=!0,o=c}finally{try{t||null==a.return||a.return()}finally{if(n)throw o}}}),e);return document.querySelectorAll(t).forEach((function(e){r.observe(e)})),function(){return r.disconnect()}}),[e,t])}(),{cmsPage:null===c||void 0===c||null===(a=c.data)||void 0===a?void 0:a.cmsPage,isValidating:s,error:u}}},49736:function(e,t,r){"use strict";var n=r(11720);t.Z=function(e){var t=e.isValidating,r=e.currentIdentifier,o=e.targetIdentifier,i=e.sectionClassName;(0,n.useLayoutEffect)((function(){t||r!==o||function(e){var t=document.getElementsByClassName(e),r=!0,n=!1,o=void 0;try{for(var i,a=t[Symbol.iterator]();!(r=(i=a.next()).done);r=!0){var l=i.value,c=!0,u=!1,s=void 0;try{for(var f,d=l.classList[Symbol.iterator]();!(c=(f=d.next()).done);c=!0){var v=f.value;if(v.includes("id-")){l.setAttribute("id",v);break}}}catch(m){u=!0,s=m}finally{try{c||null==d.return||d.return()}finally{if(u)throw s}}}}catch(m){n=!0,o=m}finally{try{r||null==a.return||a.return()}finally{if(n)throw o}}}(i)}),[r,t,i,o])}},78806:function(e,t,r){"use strict";var n=r(29815),o=r(11720);t.Z=function(e){var t=e.isValidating,r=e.tabItemSelector,i=e.keyProp,a=void 0===i?"id":i,l=e.decorateSelected,c=void 0!==l&&l,u=(0,o.useState)(""),s=u[0],f=u[1],d=(0,o.useCallback)((function(e){var t=e.target;f(t[a])}),[a]);return(0,o.useEffect)((function(){var e;if(s&&c){var t=document.querySelectorAll(r),o=(0,n.Z)(t).find((function(e){return e[a]===s}));(0,n.Z)(t).filter((function(e){return e[a]!==s})).forEach((function(e){return e.classList.remove("decorated-menu-item")})),null===o||void 0===o||null===(e=o.classList)||void 0===e||e.toggle("decorated-menu-item",c)}}),[a,c,r,s]),(0,o.useEffect)((function(){var e=document.querySelectorAll(r);return e.forEach((function(e){return e.addEventListener("click",d)})),function(){return e.forEach((function(e){return e.removeEventListener("click",d)}))}}),[d,t,r]),s}},75658:function(e,t,r){"use strict";r.d(t,{O:function(){return p}});var n=r(26042),o=r(97997),i=r(11720),a=r(41664),l=r.n(a),c=r(94184),u=r.n(c),s=function(e){var t=e.url,r=e.title,n=e.active,i=void 0!==n&&n,a=e.className;return(0,o.tZ)(f,{href:t,linkClass:u()(a,{active:i}),children:d(r)})},f=function(e){var t=e.href,r=e.children,n=e.linkClass;return t?(0,o.tZ)(l(),{href:t,children:(0,o.tZ)("a",{className:n,children:r})}):(0,o.tZ)("span",{children:r})},d=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:" ";return"".concat((e[0]||"").toUpperCase()).concat(e.substring(1).toLowerCase())},v=function(e){var t=e.product,r=e.rootText,n=e.urlSuffix,a=e.urlPrefix,l=t.categories.reduce((function(e,t){if(e.blockAccumulation)return e;var r=t.url_path;if(!r)return e;var n=r.split("/");return n.length>e.maxLength?(e.maxLength=n.length,e.breadcrumbsData.push(t)):e.blockAccumulation=!0,e}),{maxLength:0,breadcrumbsData:[],blockAccumulation:!1}).breadcrumbsData;return(0,o.BX)("span",{children:[(0,o.tZ)(s,{url:"/",title:r}),l.map((function(t){var r=t.name,l=void 0===r?"":r,c=t.url_path;return(0,o.BX)(i.Fragment,{children:[e.separator,(0,o.tZ)(s,{url:"".concat(a,"/").concat(c).concat(n),title:l},c)]},c)})),e.separator,(0,o.tZ)(s,{title:t.name,active:!0})]})},m=function(e){var t,r=e.category,n=e.rootText,a=e.urlSuffix,l=e.urlPrefix,c=null===(t=r.breadcrumbs)||void 0===t?void 0:t.sort((function(e,t){return(null===e||void 0===e?void 0:e.category_level)>(null===t||void 0===t?void 0:t.category_level)?1:-1}));return(0,o.BX)("div",{className:"breadcrumbs",children:[(0,o.tZ)(s,{url:"/",title:n}),c&&c.length&&c.map((function(t,r){var n=t.category_url_key,c=t.category_url_path,u=t.category_name;return(0,o.BX)(i.Fragment,{children:[e.separator,(0,o.tZ)(s,{url:"".concat(l,"/").concat(c||n).concat(a),title:u},"item-".concat(r))]},"item-".concat(r))})),e.separator,(0,o.tZ)(s,{title:r.name,active:!0})]})},p=function(e){var t=e.rootText,r=void 0===t?"Home":t,i=e.separator,a=void 0===i?"/":i,l=e.urlSuffix,c=void 0===l?"":l,u=e.urlPrefix,s=void 0===u?"/category":u,f=e.category,d=e.product,p={rootText:r,separator:a,urlSuffix:c,urlPrefix:s,category:f,product:d};return f?(0,o.tZ)(m,(0,n.Z)({},p)):d?(0,o.tZ)(v,(0,n.Z)({},p)):null}},50875:function(e,t,r){"use strict";r.d(t,{X:function(){return o},x:function(){return n}});var n=".tabbed-sections > div > ul",o=".tabbed-sections > div > ul li"},22881:function(e,t,r){"use strict";r.r(t),r.d(t,{__N_SSG:function(){return Z},default:function(){return T}});var n=r(97997),o=r(55184),i=r(42129),a=r.n(i),l=r(26034),c=r(1965),u=r(11720),s=r(15025),f=r(50349),d=r(75658),v=r(86443),m=[{category_name:"Insp\xedrate",category_url_key:"inspirate",category_url_path:"inspirate",category_url_prefix:"/contenido"},{category_name:"Sostenibilidad",category_url_key:"sostenibilidad",category_url_path:"sostenibilidad",category_url_prefix:"/contenido"}],p=r(37450),g=r(50875),_=r(79736),h=r(15621),y=r(98038),b=r(42220),S=h.renderToString(u.default.createElement(y.Z)),x=h.renderToString(u.default.createElement(b.Z)),k=".casaideas-accordion-title",w=function(e){var t=e.isValidating,r=e.identifier,n=(0,u.useState)(""),o=n[0],i=n[1],a=(0,u.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";i(e===o?"":e)}),[o]);(0,u.useEffect)((function(){return document.querySelectorAll(".casaideas-accordion-item").forEach((function(e,t){var n,i="".concat(r,"-item-").concat(t),l="accordion-icon",c=o===i;e.setAttribute("id",i);var u=e.querySelector("".concat(k)),s=document.createElement("div");s.setAttribute("id",l),s.innerHTML=c?S:x,null===(n=null===u||void 0===u?void 0:u.querySelector("#".concat(l)))||void 0===n||n.remove(),null===u||void 0===u||u.append(s),null===u||void 0===u||u.addEventListener("click",(function(){return a(i)}));var f=e.querySelector("".concat(".casaideas-accordion-content")),d=c?"".concat(null===f||void 0===f?void 0:f.scrollHeight,"px"):"0px";f&&(f.style.maxHeight=d,f.classList.toggle("active",c))})),function(){document.querySelectorAll(k).forEach((function(e){return e.removeEventListener("click",a)}))}}),[a,t,r,o])},C=r(78806),L=r(49736),M=r(60025),E=r(94184),A=r.n(E),Z=!0;function T(e){var t,r=e.cmsPageData,o=e.identifier,i=(0,v.$G)(["common","pdp","wishlist"]).t,h=(0,_.A)(),y=(0,s.S)(o,{revalidateOnFocus:!1,revalidateOnMount:!0,initialData:{data:{cmsPage:r}}}),b=y.cmsPage,S=void 0===b?{}:b,x=y.isValidating,k=function(e){return(0,u.useMemo)((function(){var t,r;if(e){var n=e.title,o=e.url_key,i=(null===o||void 0===o?void 0:o.includes("/"))&&(null===(t=null===o||void 0===o?void 0:o.split("/"))||void 0===t?void 0:t[0])||"",a=m.filter((function(e){return e.category_url_key===i}));return{name:n||"",breadcrumbs:a,urlPrefix:(null===(r=a[0])||void 0===r?void 0:r.category_url_prefix)||""}}}),[e])}(r);return(0,L.Z)({isValidating:x,currentIdentifier:o,targetIdentifier:"sobre-nosotros",sectionClassName:"about-us-section"}),(0,L.Z)({isValidating:x,currentIdentifier:o,targetIdentifier:"sostenibilidad/nuestras-metas-y-desafios",sectionClassName:"metas-desafios-section"}),(0,L.Z)({isValidating:x,currentIdentifier:o,targetIdentifier:"guia-de-regalos",sectionClassName:"gift-guide-section"}),(0,p.Z)(x,{isMobile:h,selector:g.x,slideSelector:g.X,arrowLeftCustomAbsoluteStyle:{bottom:"50%",left:"0"},arrowRightCustomAbsoluteStyle:{bottom:"50%",left:"calc(100% - 45px)"}}),(0,p.Z)(x,{isMobile:!0,selector:".metas-desafios-index-bar-container",slideSelector:".metas-desafios-index",arrowLeftCustomAbsoluteStyle:{bottom:"-8%",left:"0"},arrowRightCustomAbsoluteStyle:{bottom:"-8%",left:"calc(100% - 45px)"}}),w({isValidating:x,identifier:"sostenibilidad-accordion"}),(0,C.Z)({isValidating:x,tabItemSelector:".metas-desafios-index > h5 a",keyProp:"href",decorateSelected:!0}),(0,u.useEffect)((function(){(0,l.iU)(k)}),[o,k]),(0,n.BX)(n.HY,{children:[(0,n.tZ)(f.HJ,{preloadImages:{images:[null===S||void 0===S?void 0:S.content]},cmsPage:S,page:f.Gy.CMS}),(0,n.BX)("div",{className:A()(a()["cms-page"],a().main),children:[k&&(null===k||void 0===k||null===(t=k.breadcrumbs)||void 0===t?void 0:t.length)>0?(0,n.tZ)(d.O,{category:k,separator:"|",urlPrefix:k.urlPrefix,rootText:i("breadcrumbs|Home")}):null,(0,n.tZ)(c.w,{html:(0,M.u)(null===S||void 0===S?void 0:S.content)})]})]})}T.Layout=o.Ar},42129:function(e){e.exports={"cms-page":"Cms_cms-page__r3Wai",main:"Cms_main__KmZ7T"}},57649:function(e,t,r){"use strict";r.r(t),r.d(t,{render:function(){return w},renderToStaticMarkup:function(){return w},renderToString:function(){return w},shallowRender:function(){return x}});var n=r(6400),o=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|^--/i,i=/^(area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr)$/,a=/[\s\n\\/='"\0<>]/,l=/^xlink:?./,c=/["&<]/;function u(e){if(!1===c.test(e+=""))return e;for(var t=0,r=0,n="",o="";r(t||40)||!r&&-1!==String(e).indexOf("\n")||-1!==String(e).indexOf("<")},d={},v=/([A-Z])/g;function m(e){var t="";for(var r in e){var n=e[r];null!=n&&""!==n&&(t&&(t+=" "),t+="-"==r[0]?r:d[r]||(d[r]=r.replace(v,"-$1").toLowerCase()),t="number"==typeof n&&!1===o.test(r)?t+": "+n+"px;":t+": "+n+";")}return t||void 0}function p(e,t){return Array.isArray(t)?t.reduce(p,e):null!=t&&!1!==t&&e.push(t),e}function g(){this.__d=!0}function _(e,t){return{__v:e,context:t,props:e.props,setState:g,forceUpdate:g,__d:!0,__h:[]}}function h(e,t){var r=e.contextType,n=r&&t[r.__c];return null!=r?n?n.props.value:r.__:t}var y=[];function b(e,t,r,o,c,d){if(null==e||"boolean"==typeof e)return"";if("object"!=typeof e)return"function"==typeof e?"":u(e);var v=r.pretty,g=v&&"string"==typeof v?v:"\t";if(Array.isArray(e)){for(var S="",x=0;x0&&(S+="\n"),S+=b(e[x],t,r,o,c,d);return S}if(void 0!==e.constructor)return"";var k,w=e.type,C=e.props,L=!1;if("function"==typeof w){if(L=!0,!r.shallow||!o&&!1!==r.renderRootComponent){if(w===n.HY){var M=[];return p(M,e.props.children),b(M,t,r,!1!==r.shallowHighOrder,c,d)}var E,A=e.__c=_(e,t);n.YM.__b&&n.YM.__b(e);var Z=n.YM.__r;if(w.prototype&&"function"==typeof w.prototype.render){var T=h(w,t);(A=e.__c=new w(C,T)).__v=e,A._dirty=A.__d=!0,A.props=C,null==A.state&&(A.state={}),null==A._nextState&&null==A.__s&&(A._nextState=A.__s=A.state),A.context=T,w.getDerivedStateFromProps?A.state=Object.assign({},A.state,w.getDerivedStateFromProps(A.props,A.state)):A.componentWillMount&&(A.componentWillMount(),A.state=A._nextState!==A.state?A._nextState:A.__s!==A.state?A.__s:A.state),Z&&Z(e),E=A.render(A.props,A.state,A.context)}else for(var Y=h(w,t),H=0;A.__d&&H++<25;)A.__d=!1,Z&&Z(e),E=w.call(e.__c,C,Y);return A.getChildContext&&(t=Object.assign({},t,A.getChildContext())),n.YM.diffed&&n.YM.diffed(e),b(E,t,r,!1!==r.shallowHighOrder,c,d)}w=(k=w).displayName||k!==Function&&k.name||function(e){var t=(Function.prototype.toString.call(e).match(/^\s*function\s+([^( ]+)/)||"")[1];if(!t){for(var r=-1,n=y.length;n--;)if(y[n]===e){r=n;break}r<0&&(r=y.push(e)-1),t="UnnamedComponent"+r}return t}(k)}var P,O,q="<"+w;if(C){var N=Object.keys(C);r&&!0===r.sortAttributes&&N.sort();for(var I=0;I",a.test(w))throw new Error(w+" is not a valid HTML tag name in "+q);var W,X=i.test(w)||r.voidElements&&r.voidElements.test(w),D=[];if(O)v&&f(O)&&(O="\n"+g+s(O,g)),q+=O;else if(null!=P&&p(W=[],P).length){for(var $=v&&~q.indexOf("\n"),B=!1,z=0;z0&&"<"!=G[0];B&&J?D[D.length-1]+=G:D.push(G),B=J}else D.push(G)}}if(v&&$)for(var K=D.length;K--;)D[K]="\n"+g+s(D[K],g)}if(D.length||O)q+=D.join("");else if(r&&r.xml)return q.substring(0,q.length-1)+" />";return!X||W||O?(v&&~q.indexOf("\n")&&(q+="\n"),q=q+""):q=q.replace(/>$/," />"),q}var S={shallow:!0};w.render=w;var x=function(e,t){return w(e,t,S)},k=[];function w(e,t,r){t=t||{};var o=n.YM.__s;n.YM.__s=!0;var i,a=(0,n.h)(n.HY,null);return a.__k=[e],i=r&&(r.pretty||r.voidElements||r.sortAttributes||r.shallow||r.allAttributes||r.xml||r.attributeHook)?b(e,t,r):Z(e,t,!1,void 0,a),n.YM.__c&&n.YM.__c(e,k),n.YM.__s=o,k.length=0,i}function C(e){return null==e||"boolean"==typeof e?null:"string"==typeof e||"number"==typeof e||"bigint"==typeof e?(0,n.h)(null,null,e):e}function L(e,t){return"className"===e?"class":"htmlFor"===e?"for":"defaultValue"===e?"value":"defaultChecked"===e?"checked":"defaultSelected"===e?"selected":t&&l.test(e)?e.toLowerCase().replace(/^xlink:?/,"xlink:"):e}function M(e,t){return"style"===e&&null!=t&&"object"==typeof t?m(t):"a"===e[0]&&"r"===e[1]&&"boolean"==typeof t?String(t):t}var E=Array.isArray,A=Object.assign;function Z(e,t,r,o,l){if(null==e||!0===e||!1===e||""===e)return"";if("object"!=typeof e)return"function"==typeof e?"":u(e);if(E(e)){var c="";l.__k=e;for(var s=0;s",a.test(f))throw new Error(f+" is not a valid HTML tag name in "+b);var w="",T=!1;if(y)w+=y,T=!0;else if("string"==typeof g)w+=u(g),T=!0;else if(E(g)){e.__k=g;for(var Y=0;Y";return b+""}w.shallowRender=x,t.default=w},15621:function(e,t,r){var n;try{const e=r(57649);n=e.default||e.renderToString||e}catch(o){throw Error('renderToString() error: missing "preact-render-to-string" dependency.')}e.exports={renderToString:n,renderToStaticMarkup:n}}},function(e){e.O(0,[2888,179],(function(){return t=70049,e(e.s=t);var t}));var t=e.O();_N_E=t}]);